fix: data races#747
Merged
Merged
Conversation
added 3 commits
April 8, 2025 12:26
Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
… double start Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
added 2 commits
April 8, 2025 13:17
Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
…o interfaces, replace maps with sync.Map for concurrency safety Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
… and improved memory management Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
added 2 commits
April 8, 2025 17:16
…nd improved memory management Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
Contributor
There was a problem hiding this comment.
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
pkg/schedule_manager/schedule_manager.go:18
- Converting ScheduleManager from an interface to a concrete struct type may break abstraction boundaries and affect consumers expecting an interface. Confirm that this change is intentional and that all dependent code is updated accordingly.
type ScheduleManager struct {
added 2 commits
April 9, 2025 08:49
Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
… management Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
Contributor
There was a problem hiding this comment.
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
test/hook/context/generator.go:132
- [nitpick] Consider using b.started.Store(true) instead of Swap(true) if the previous value is not required, as it more clearly conveys that the flag is simply being set.
b.started.Swap(true)
pkg/kube_events_manager/kube_events_manager.go:100
- If no monitor exists for the given monitorID, calling monitor.Start(mgr.ctx) may result in a nil pointer dereference. Consider adding a nil check and error handling before starting the monitor.
monitor := mgr.Monitors[monitorID]
added 2 commits
April 9, 2025 09:45
…s for improved memory management Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
…d error handling for missing monitors Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
added 3 commits
April 9, 2025 10:46
…anager and ScheduleManager for consistency Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
…dling Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
…ger and ScheduleManager for consistency Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
added 2 commits
April 9, 2025 11:09
…or tests Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
…y and consistency Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
…nt informer creation Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
added 4 commits
April 9, 2025 16:23
…d cancellation functions Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
…y range operations Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
…ng existence before invocation Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
…-specific factory store in resource informer Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
fc33841 to
f3e8c45
Compare
…ager for consistent informer management Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
miklezzzz
approved these changes
Apr 10, 2025
Contributor
miklezzzz
left a comment
There was a problem hiding this comment.
a breath of fresh air :)
yalosev
approved these changes
Apr 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Fixing data races in code and tests
What this PR does / why we need it
Some edits